//||=========================================================================||
//||                                                                         ||
//||                             CudaCounter.h                               ||
//||                                                                         ||
//||                           by the_best_goose))                           ||
//||                                                                         ||
//||=========================================================================||

#include "MandelbrotCounter.h"

#ifndef CUDACOUNTER_H_
#define CUDACOUNTER_H_

//-----------------------------------------------------------------------------

class CudaCounter: public MandelbrotCounter
{
public:

    CudaCounter(const MainWindow* pwind, const QWidget* pmand_pic);
    ~CudaCounter();

protected:

    void run();

private:

    void GenerateFile();
    void CompileFile();
    
    void LoadLibrary();

    typedef void (*CudaCountFunc)(FastComplex t, FastComplex* iter_points,
                                  int iter_points_count,
                                  float left, float right, 
                                  float bottom, float top,
                                  int iters_count, int* result_arr, 
                                  int size_w, int size_h);

    CudaCountFunc pcuda_count_func_;
};


//-----------------------------------------------------------------------------

#endif //CUDACOUNTER_H
